<?php
	session_start();

	deletePhoto();

	function deletePhoto(){
		$userName = $_SESSION['userName'];
		$image = '.'.$_GET['image'];
		
		$response = array(
			'userName' => $userName,
			'image' => $image,
			'success' => false
		);
		
		if(unlink($image)){
			$response['success'] = true;
		}

		echo json_encode($response);
	}
?>